<!DOCTYPE html>
<html>
<head>
<include file="Include:meta" />
<title>目的地运营集团数据管理平台</title>
<link type="text/css" rel="stylesheet" href="__PUBLIC__/css/bootstrap.css" />
<link type="text/css" rel="stylesheet" href="__PUBLIC__/css/font-awesome.css" />
<link type="text/css" rel="stylesheet" href="__PUBLIC__/css/common.css" />
<link type="text/css" rel="stylesheet" href="__PUBLIC__/css/login.css?a=1" />
</head>
<body>
	<div class="login-cont">
		<!-- <div class="recommend animate clearboth"> -->
			<!-- <div class="photo"><img src="{$result['img']}" alt=""></div> -->
			<!-- <div class="content"> -->
				<!-- <img src="__PUBLIC__/images/hello.png" alt=""> -->
				<!-- <span>今日推荐</span> -->
				<!-- <h3>{$result['name']}</h3> -->
				<!-- <p>{$result['content']}<if condition="$result['hello_img'] neq NULL"><br><br>{$result['hello_img']}</if></p> -->
			<!-- </div> -->
		<!-- </div> -->
		<div class="login-fix animate">
			<div class="logo"><img src="__PUBLIC__/images/logo.png" alt=""></div>
			<div class="warning"></div>
			<div class="input-cont">
				<p>用户名</p>
				<input type="text" placeholder="请输入账号(中文姓名),邮箱或手机号" class="form-control" name="username" value="{$username}" autocomplete="off">
			</div>
			<div class="input-cont">
				<p>密码</p>
				<input type="password" class="form-control" name="password" autocomplete="off">
			</div>
			<div class="input-cont Text_c">
				<button type="button" class="btn">登 录</button>
			</div>
		</div>
	</div>
<script type="text/javascript" src="__PUBLIC__/js/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/respond.src.js"></script>
<script type="text/javascript">
$(function(){
	resize();
	$(window).resize(function(){
		resize();
	})
	document.onkeydown = function(e){ 
		var ev = document.all ? window.event : e;
		if(ev.keyCode==13) {
			submit();
		}
	}
	$('.btn').click(function(){
		submit();
	})
	function submit(){
		var username = $("[name='username']").val(),
			password = $("[name='password']").val();
		if(username!='' && password!=''){
			$.ajax({
				type:"POST",
				async:false,
				dataType:"json",
				url:"__APP__/Index/do_login",
				data:{"username":username,"password":password},
				success:function(data){
					if(data.status==0){
						$('.warning').text(data.msg);
					}else{
						window.location=data.url;
					}
				}
			});
		}else{
			$('.warning').text("请输入账号和密码");
		}

	}
	$(".form-control").on("focus",function(){
		$('.warning').text("");
	});
});
function resize(){
	$('.login-cont').height($(window).height());
}
</script>
</body>
</html>
